package jp.co.apl.haven.ao.entity;

import jp.co.apl.haven.generated.HavenProtos.InputType;
import net.java.ao.Entity;
import net.java.ao.OneToMany;
import net.java.ao.Preload;
import net.java.ao.schema.NotNull;
import net.java.ao.schema.Table;
import net.java.ao.schema.Unique;

@Table("question")
@Preload({ "questionId", "title", "text", "inputType", "unit", "sortOrder" })
public interface QuestionEntity extends Entity {

    @Unique
    Integer getQuestionId();

    void setQuestionId(Integer questionId);

    @NotNull
    String getTitle();

    void setTitle(String title);

    @NotNull
    String getText();

    void setText();

    InputType getInputType();

    void setInputType(InputType inputType);

    String getUnit();

    void setUnit(String unit);

    Integer getSortOrder();

    void setSortOrder(Integer sortOrder);

    @OneToMany
    SelectionItemEntity[] getSelectionItems();

    void setCategory(CategoryEntity category);

    void setParentSelectionItemId(Integer parentSelectionItemId);

}
